using ECommerce.Web.Models;

namespace ECommerce.Web.NHibernate.Mappings.EntityMappings
{
    public class ShopperMap : BaseMap<Shopper>
    {
        public ShopperMap()
        {
            Id(x => x.Id).GeneratedBy.Assigned();

            Version(x => x.Version).UnsavedValue("0");

            References(x => x.Basket).Column("BasketId").Unique().Access.CamelCaseField().Cascade.All();
        }
    }
}